home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
wtek0693.zip
/
OOPALLEY.ZIP
/
RANGE.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-27
|
671b
|
37 lines
#include "range.h"
#define THIS Range
#define BASE Object
DEFINE_CLASS(Range,Object);
//======= Public member functions:
Object* Range::copy() const
{
return shallowCopy();
}
void Range::deepenShallowCopy() {}
unsigned Range::hash() const
{
return (first^len);
}
bool Range::isEqual(const Object& p) const
// Test two objects for equality
{
return p.isSpecies(class_Range) && *this==*(Range*)&p;
}
void Range::printOn(ostream& strm) const
{
strm << first << ":" << len;
}
const Class* Range::species() const
// Return a pointer to the descriptor of the species of this class
{
return &class_Range;
}